package com.nine.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.nine.entity.Users;
import com.nine.service.UsersService;
@Controller
public class UsersController {
	@Autowired
	private UsersService usersService;
	
	@RequestMapping("show.do")
	public String getUsers(Model model) {
		List<Users> list = usersService.getAllUsers();
		//System.out.println(list.size());
		model.addAttribute("list", list);
		return "show.jsp";
	}
}
